package com.ehome.poct.core.repository;

import com.ehome.core.page.Page;
import com.ehome.core.repository.BaseRepository;
import com.ehome.poct.core.api.dto.ReportListDTO;
import com.ehome.poct.core.api.dto.TestDataDTO;
import com.ehome.poct.core.api.dto.check.CheckReportDTO;
import com.ehome.poct.core.api.dto.check.gold.TestReportPoctDTO;
import com.ehome.poct.core.api.dto.check.gold.TestReportPoctUniDTO;
import com.ehome.poct.core.api.dto.checkdata.CheckItemResultDTO;
import com.ehome.poct.core.api.dto.report.TestConfUniProjectDescDTO;
import com.ehome.poct.core.api.dto.report.TestReportConfigDTO;
import com.ehome.poct.core.api.vo.CheckReportVO;
import com.ehome.poct.core.api.vo.ReportDetailVO;
import com.ehome.poct.core.api.vo.ReportDtlVO;
import com.ehome.poct.core.api.vo.patient.PatientDetailVO;

import java.util.List;

/**
 * @description: 报告相关
 * @author: muqiu
 * @time: 2022/3/3 17:56
 */
public interface BldReportRepository extends BaseRepository<CheckReportDTO> {

    Page<CheckReportVO> getCheckList(ReportListDTO dto);

    ReportDetailVO getCheckReportByOrderNo(String orderNo);

    ReportDetailVO getCheckReport(Long reportId);

    void delBld(Long id);

    List<List<Object>> getResultWithKpis(TestDataDTO data, String result, Integer dataType,Integer isChild);

    ReportDtlVO toReportDtlVO(TestReportPoctDTO r, PatientDetailVO patient, TestDataDTO data, String generateNotifyUrl);

    ReportDtlVO toReportDtlVO(TestReportPoctUniDTO r, String stripName, PatientDetailVO patient, String generateNotifyUrl, TestConfUniProjectDescDTO projectDesc, String sampleType);

    /**
     * 根据订单号删除
     *
     * @param orderNo
     */
    void delByOrderNo(String orderNo);


    void updateResultCode(CheckReportDTO report, List<CheckItemResultDTO> results, Integer type, Integer projectCode);

    void reportConfigBld(TestReportConfigDTO testReportConfigDTO);

    void updateByOrderNo(String orderNo);
}
